export const state = () => {
  return { activeTabName: '' }
}

export const mutations = {
  changeActiveTabName(state, activeName) {
    state.activeTabName = activeName
    saveStateToStorage(state)
  }
}

function saveStateToStorage(state) {
  window.localStorage.setItem('activeTabName', state.activeTabName)
}
